﻿using System;
using FreeSql.DataAnnotations;

namespace App.Model.Main
{
    /// <summary>
    /// 接口接口（权限）
    /// </summary>
    //[Table(Name = "sys_api")]
    [Index("uk_{tablename}_Path", nameof(Path), true)]
    public class SysApi : EntityBase<int>
    {
        /// <summary>
        /// 接口名
        /// </summary>
        [Column(StringLength = 200, IsNullable = false)]
        public string Name { get; set; }

        /// <summary>
        /// 控制器名
        /// </summary>
        [Column(StringLength = 100, IsNullable = false)]
        public string Controller { get; set; }

        /// <summary>
        /// 方法名
        /// </summary>
        [Column(StringLength = 100, IsNullable = false)]
        public string Action { get; set; }

        /// <summary>
        /// 接口提交方法
        /// </summary>
        [Column(StringLength = 10)]
        public string Method { get; set; }

        /// <summary>
        /// 访问路径 不包括域名
        /// </summary>
        [Column(StringLength = 200, IsNullable = false)]
        public string Path { get; set; }

        /// <summary>
        /// 所属模块id
        /// </summary>
        public int ModuleId { get; set; }

        /// <summary>
        /// 所属平台id
        /// </summary>
        public int PlatformId { get; set; }
    }
}


